package com.xh.bussiness.system.model;

import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

import com.xh.bussiness.system.constant.AuditApplyConstant;
import com.xh.core.model.SuperEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 审核日志表
 * </p>
 *
 * @author daiwei
 * @since 2019-02-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_audit_apply_log")
public class AuditApplyLog extends SuperEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 审核申请主表ID
     */
    private String auditApplyId;

    /**
     * 审核级别
     */
    private Integer auditApplyLevel;

    /**
     * 审核操作类别（1提交/2通过/3驳回/4取消）
     */
    private Integer operateType;

    public AuditApplyLog(){

    }


    public AuditApplyLog(String auditApplyId, Integer auditOperateType, String remark, Integer auditApplyLevel){
        this.auditApplyId=auditApplyId;
        this.operateType=auditOperateType;
        this.auditApplyLevel=auditApplyLevel;
    }

    /**
     *
     * <p>作者:David</p>
     * <p>功能描述:取消操作</p>
     * <p>创建时间:20122012-8-3下午03:10:46</p>
     * <p>@param operater
     * <p>@param auditApplyId
     * <p>@param remark
     * <p>@return</p>
     * <p>修改:</p>
     */
    public static AuditApplyLog createCancleLog(String auditApplyId,String remark,Integer auditApplyLevel){
        return new AuditApplyLog(auditApplyId, AuditApplyConstant.AuditOperateType.CANCLED,remark,auditApplyLevel);
    }

    /**
     *
     * <p>作者:David</p>
     * <p>功能描述:提交操作</p>
     * <p>创建时间:20122012-8-3下午03:15:21</p>
     * <p>@param operater
     * <p>@param auditApplyId
     * <p>@param remark
     * <p>@return</p>
     * <p>修改:</p>
     */
    public static AuditApplyLog createSubmitLog(String auditApplyId,String remark,Integer auditApplyLevel){
        return new AuditApplyLog(auditApplyId,AuditApplyConstant.AuditOperateType.SUBMIT,remark,auditApplyLevel);
    }

    /**
     *
     * <p>作者:David</p>
     * <p>功能描述:提交操作</p>
     * <p>创建时间:20122012-8-3下午03:15:21</p>
     * <p>@param operater
     * <p>@param auditApplyId
     * <p>@param remark
     * <p>@return</p>
     * <p>修改:</p>
     */
    public static AuditApplyLog createCancelLog(String auditApplyId,String remark,Integer auditApplyLevel){
        return new AuditApplyLog(auditApplyId,AuditApplyConstant.AuditOperateType.CANCLED,remark,auditApplyLevel);
    }

    /**
     *
     * <p>作者:David</p>
     * <p>功能描述:审核通过日志</p>
     * <p>创建时间:20122012-8-3下午03:15:34</p>
     * <p>@param operater
     * <p>@param auditApplyId
     * <p>@param remark
     * <p>@return</p>
     * <p>修改:</p>
     */
    public static AuditApplyLog createPassLog(String auditApplyId,String remark,Integer auditApplyLevel){
        return new AuditApplyLog(auditApplyId,AuditApplyConstant.AuditOperateType.PASSED,remark,auditApplyLevel);
    }

    /**
     *
     * <p>作者:David</p>
     * <p>功能描述:驳回操作日志</p>
     * <p>创建时间:20122012-8-3下午03:15:46</p>
     * <p>@param operater
     * <p>@param auditApplyId
     * <p>@param remark
     * <p>@return</p>
     * <p>修改:</p>
     */
    public static AuditApplyLog createRejectLog(String auditApplyId,String remark,Integer auditApplyLevel){
        return new AuditApplyLog(auditApplyId,AuditApplyConstant.AuditOperateType.REJECTED,remark,auditApplyLevel);
    }

}
